1. Field of the Invention
This invention relates to a storage device for storage of optional data and the area management information for supervising the state of the area in which to store the data, a data processing system and a data processing method employing this storage device.
2. Description of the Related Art
Up to now, a card type external storage device, referred to hereinafter as a memory card, employing a flash memory (electrically erasable programmable read-only memory (ROM)) as a recording medium, has been proposed as an external data storage device used for an electronic equipment.
In this memory card, optional data and the management information as ancillary data are stored in a memory as a storage medium. When these data and the management information are sent from the memory card to e.g., a host side computer, the data or the management information is corrected for errors, using the error correction codes, to correct the data for errors produced by cell malfunctions, before outputting the data or information.
As the above management information, the information for management of the state of an area for data storage (area management information), such as the information specifying whether or not the area holding the data on memory is usable, is occasionally stored, in addition tor the data-dependent information for supervising the data (data management information), such as logical addresses indicating the sequence of the stored data.
Since the area management information is the information concerning an in-memory area, that is information independent of data, there may arise the necessity of rewriting the information after storage of the data, and hence the area management information is usually adapted to be rewritten by itself without rewriting the data.
Also, if an error is produced in the area management information, and a usual error correction code is used to correct the information for errors, the error correction codes need to be rewritten every time the information is rewritten. Thus, for the area management information, the same information is desirably distributed in plural bits and stored in this state in order to combat errors without employing the error correction code for error correction.
Meanwhile, if the same information is distributed in plural bits and stored in this state to combat errors, the area management information occasionally cannot be corrected for errors on occurrence of malfunctions in plural cells in which the same information is stored. It is therefore desirable that the area management information once corrected for errors can be discriminated to be the information corrected for errors, so that, in case of storage in the memory card next time, the data will be stored in an area other than the area subjected to the malfunction.
It is therefore an object of the present invention to provide a storage device for outputting data in such a manner that whether or not the area management information has been corrected for errors can be discriminated.
It is another object of the present invention to provide a data processing system in which a storage device sends data to a data processing device in such a manner that whether or not the area management information has been corrected for errors can be discriminated and in which the data processing device discriminates whether or not the area management information has been corrected for errors in order to perform defined data processing.
It is yet another object of the present invention to provide a data processing method used in the storage device and in the data processing system.
In one aspect, the present invention provides a storage device including storage means for storing data and the area management information for supervising the state of an area in which the data is stored, error correcting processing means for correcting the area management information for predetermined errors if such errors are present in the area management information read out from the storage means, and data processing means for reading the area management information from the storage means, supplying the area management information to the error correcting processing means if errors that can be corrected by the error correcting processing means are present in the area management information. The data processing means appends a flag specifying the fact of error correction to the area management information corrected for errors, and outputs the resulting information.
In the present storage device, if the area management information read from the storage means has errors correctable by error correction means, the data processing device sends the area management information to the error correction means and appends a flag indicating the fact of error correction to the area management information corrected for errors to output the corrected area management information.
In another aspect, the present invention provides a data processing system including a storage device for storing data and the area management information for supervising the state of an area in which the data is stored, and a data processing device for supplying data and the area management information to the storage device or receiving and processing the data and the area management information outputted by the storage device.
If the area management information stored in the storage device has correctable errors, the data processing system corrects the area management information for errors and appends a flag specifying the fact of error correction to the area management information corrected for errors to route the corrected area management information with the appended flag to the data processing device.
If a flag indicating the fact of error correction by the data processing device is appended to the area management information entered from the storage device, the data processing system recognizes, by the flag, that the input area management information is the information corrected for errors, in order to perform defined processing.
In yet another aspect, the present invention provides a data processing method including reading out data stored in storage means and the area management information in order to supervise the state of an area in which the data is stored, and correcting the area management information read out from the storage means for errors if the area management information has correctable errors, and outputting the corrected information with a flag indicating the fact of error correction appended thereto.
If a flag indicating the fact of error correction by the data processing device is appended to the area management information entered from the storage device, the data processing method recognizes, by the flag, that the input area management information is the information corrected for errors, in order to perform defined processing.